import request from '@/utils/request'

// 查询还款计划支付列表
export function listPay(query) {
  return request({
    url: '/fs/pay/list',
    method: 'get',
    params: query
  })
}

// 查询还款计划支付详细
export function getPay(id) {
  return request({
    url: '/fs/pay/' + id,
    method: 'get'
  })
}

// 新增还款计划支付
export function addPay(data) {
  return request({
    url: '/fs/pay',
    method: 'post',
    data: data
  })
}

// 修改还款计划支付
export function updatePay(data) {
  return request({
    url: '/fs/pay',
    method: 'put',
    data: data
  })
}

// 删除还款计划支付
export function delPay(id) {
  return request({
    url: '/fs/pay/' + id,
    method: 'delete'
  })
}

// 查询还款计划支付详细
export function shPay(id) {
  return request({
    url: '/fs/pay/sh/' + id,
    method: 'get'
  })
}

// 删除还款计划支付
export function delPayFile(scheduleId,payId,name) {
  return request({
    url: '/fs/pay/file/' + scheduleId+"/"+ payId+"/"+name,
    method: 'delete'
  })
}
